<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
    <el-table
            :data="tableData"
            border
            style="width: 100%">
        <el-table-column
                prop="pid"
                label="部门编号"
                width="180">
        </el-table-column>
        <el-table-column
                prop="pname"
                label="部门名称"
                width="180">
        </el-table-column>
        <el-table-column
                prop="premark"
                label="部门备注"
                width="180">
        </el-table-column>
        <el-table-column
                prop="pis"
                label="关联id">
        </el-table-column>
    </el-table>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
    new Vue({
        el: '#app',
        data: function() {
            return {
                tableData: []
            };
        },
        created: function () {
            //获取控制台的全路径
            axios.post('http://localhost:8080/pages/list.do').then(response=>{
                this.tableData = response.data;
            });
        }
    })
</script>
</html>